export const rules = {
    factoryName: [
        { required: true, message: '请输入厂区名称', trigger: 'blur' },
        { min: 2, max: 12, message: '厂区名称长度2-12位', trigger: 'blur' }
    ],
    factoryCode: [
        { required: true, message: '请输入厂区编码', trigger: 'blur' },
        { min: 2, max: 20, message: '厂区编码长度2-20位', trigger: 'blur' },
    ],
    factoryAddress: [
        { required: true, message: '请输入厂区地址', trigger: 'blur' },
        { min: 2, max: 60, message: '厂区地址长度2-60位', trigger: 'blur' },
    ],
    factoryLeader: [
        { required: true, message: '请选择厂区负责人', trigger: 'change' },
    ],
    open: [
        { required: true, message: '请选择状态', trigger: 'blur' },
    ],
    factoryTel: [
        { required: true, message: '请输入联系电话', trigger: 'blur' },
        { pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, message: '请输入正确的联系电话（分段使用 - ）' }
    ],
};
